home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
mus
/
edit
/
OctamedSS1.03c.lha
/
Soundstudio
/
Rexx
/
omed.lha
/
rexx
/
cmd19arg.omed
< prev
next >
Wrap
Text File
|
1995-09-15
|
970b
|
29 lines
/* cmd19arg */
/* calculates the argument for command 19 to get the sample */
/* start as near the range start as possible */
/* Instructions:
Copy this macro to OctaMED directory. Create a new shortcut
in the Keyboard Shortcut editor. Set the shortcut name and
input part as you wish, set Action as Execute ARexx File,
Command as cmd19arg, and Window as SAMPLEEDITOR.
When you want to start a sample not from the beginning, using
the command 19xx, open the Sample Editor, point the range
cursor where you want to begin playing, and press the key you
had set up. The macro calculates and displays the nearest
value for command 19.
*/
address 'OCTAMED_REXX'
"sa_getrangestart var rngstart"
if (rc = 0) then do
cmd19arg = trunc((rngstart + 128) / 256)
if (cmd19arg > 255) then "wi_showstring The point is too far from the beginning."
else do
hexval = d2x(cmd19arg)
if (cmd19arg < 16) then hexval = "0"hexval
"wi_showstring Command: 19"hexval
end
end